home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr25 / view3d.zip / MANUAL.DOC < prev    next >
Text File  |  1993-06-07  |  14KB  |  265 lines

  1. =============================================================================
  2. ==============   3-D    W O R L D    F O R    O S / 2    2.x    =============
  3. =============================================================================
  4. Copyright (C) 1993 by Shuqian Ying
  5. Written By Shuqian Ying
  6.  
  7. =========================      M A N U A L       ==============================
  8.  
  9.  
  10. Section 1. Model Definition:
  11.  
  12.    There are two ways of defining 3-D images in the present version of
  13. the program.
  14.  
  15.   1.1 Defining the 3-D images through parametric analytic functions
  16.  
  17.           An example is z = f(x,y), f(x,y) = x^2 + y^2, which is one of
  18.       the simplest cases. The program however allows you to generate the
  19.       3-D data set in a parameter space, such as
  20.  
  21.          x = f(u,v), y = g(u,v), z = h(u,v),
  22.  
  23.        provided that the regions defining the images in the (u,v) parameter
  24.        space are rectangular ones of the following form
  25.  
  26.            u_min < u <= u_max,  v_min < v <= v_max.
  27.  
  28.    1.2 Defining the 3-D images through ASCII script files
  29.  
  30.            The format of these script files in the current version of the
  31.         program is
  32.  
  33.         ----------------------------------------------------------------------
  34.         id: #               | A non-negative integer id number. (0<= id < 30)
  35.         ----------------------------------------------------------------------
  36.         Name: name          | A string that labels a particular data set.
  37.         ----------------------------------------------------------------------
  38.         Color:              | A string that declares the color of the covering
  39.                             | surface of the image. The available colors are:
  40.                             | Blue, DarkBlue, Green, DarkGreen, Red, DarkRed,
  41.                             | Yellow, Cyan, Pink, DarkPink, White, Black,
  42.                             | Brown, DarkGray, PaleGray
  43.         ----------------------------------------------------------------------
  44.         nu nv               | nu is the number of mesh points on the u-axis
  45.                             | and nv is the number of mesh points on the v-axis.
  46.         ----------------------------------------------------------------------
  47.         x1 y1 z1            | This set is the 3-D data block. The order of these
  48.         x2 y2 z2            | 3-D data points are arranged such that the u
  49.         ....                | parameter is kept fixed while v run from v_1 to
  50.         ....                | v_nv, then u changes to its next value and v run
  51.         xn yn zn            | from v_1 to v_nv again.
  52.         ----------------------------------------------------------------------
  53.         Coordinate          | A string that signifies the beginning of the body
  54.                             | coordinate definition.
  55.         ----------------------------------------------------------------------
  56.         xx0 xy0 xz0         | Two points that define the x_axis. It can be set
  57.         xx1 xy1 xz1         | to {0 0 0} and {a 0 0} at the beginning, with "a"
  58.                             | a number of the same order as the size of the 3-D
  59.                             | object.
  60.         ----------------------------------------------------------------------
  61.         yx0 yy0 yz0         | Two points that define the y_axis. It can be set
  62.         yx1 yy1 yz1         | to {0 0 0} and {0 a 0} at the beginning. "a"
  63.                             | should be the same as the one for the x_axis.
  64.         ----------------------------------------------------------------------
  65.         zx0 zy0 zz0         | Two points that define the z_axis. It can be set
  66.         zx1 zy1 zz1         | to {0 0 0} and {0 0 a} at the beginning. "a"
  67.                             | should be the same as the one for the x_axis.
  68.         ----------------------------------------------------------------------
  69.         next/end            | A string signifies the termination of the data
  70.                             | set definition. If the string is "next", it also
  71.                             | signifies the begin of a next one. Otherwise, it
  72.                             | signifies the end of the definition.
  73.         ----------------------------------------------------------------------
  74.         .....               | Repeat the above steps, if a "next" is read, to
  75.         .....               | define another 3-D object to be plotted on the
  76.         .....               | same screen.
  77.         ----------------------------------------------------------------------
  78.  
  79.    1.3 Miscellaneous Information
  80.  
  81.        1.3.1  Use different id for different part of the data set. Also
  82.               nu >= 3 and nv >= 3 should be used for the current version
  83.               of the program.
  84.        1.3.2  This demonstration program will not allow you to input another
  85.               data set from a script file before cleaning up (see later part
  86.               of this document) the current ones.
  87.        1.3.3  In addition, only a few predefined analytical (parametric) 3-D
  88.               models are provided for demonstration purposes. If you like to
  89.               investigate your own data set, use the script file method by
  90.               generating the data file first.
  91.        1.3.4  Finally, error checking for file parsing has not been
  92.               implemented. So script file with incorrect format will likely
  93.               crash the program.
  94.  
  95. Section 2. Actions
  96.  
  97.  
  98.    2.1 The viewer's motion:
  99.  
  100.     The motion of the viewer can be simulated by the mouse.
  101.  
  102.     2.1.1 Adjusting open viewing angle
  103.  
  104.             The viewer can adjust his/her open viewing angle to simulate the
  105.           effects of a telescope. This mode can be activated in the "Zoom"
  106.           sub-menu of the "View" menu. After activating this mode, the viewer
  107.           can zoom-in by clicking the mouse button 1 and zoom-out by clicking
  108.           mouse button 2. To deactivate the zooming mode, click the mouse
  109.           button 3 or the ESC key in case the viewer has a two button mouse or
  110.           prefers to do so. In the current version of the program, the
  111.           increment and decrement of the view angle for each click of the
  112.           mouse button can not be changed by the viewer.
  113.  
  114.     2.1.2 Walking
  115.  
  116.              The viewer can walk forward and backward in his/her focus direc-
  117.           tion of viewing. This mode can be activated in the "Action" menu by
  118.           clicking on the "Walk Stopped" item. Once the walking mode is
  119.           activated, the "Walk Stopped" item is changed to "Walking..."
  120.           indicating that the viewer is in walking mode. The viewer walk
  121.           forward if he/she clicks the mouse button 1 and walk backward if
  122.           he/she clicks the mouse button 2. This mode is deactivated by
  123.           clicking the mouse button 3  or pressing the ESC key in case the
  124.           viewer has a two button mouse or prefers to do so. In the current
  125.           version of the program, the increment or decrement of the viewer's
  126.           distance to origin of the world coordinate following each clicking
  127.           of the mouse button can not be changed by the viewer.
  128.  
  129.     2.1.3 Shifting focus
  130.  
  131.              The viewer can shift his/her focus (of viewing). The focus point
  132.           of the viewer on the screen is assumed to be at the center. To shift
  133.           the focus point, activate the shift focus mode in the "Action" menu.
  134.           By pointing the mouse pointer to the point of interest and clicking
  135.           the mouse button 1, the effects of shifting focus point in the real
  136.           lift can be achieved. This mode is automatically deactivated when
  137.           the program finishes the shifting focus process.
  138.  
  139.     2.1.4 Simulations of viewer's motion
  140.  
  141.              The viewer can "fly" through and around the 3-D object in real
  142.           time. This is a mini virtual reality (VR) mode in which the viewer
  143.           can look around at all directions and move to anywhere in the
  144.           virtual 3-D space. This mode is activated in the "Action" menu.
  145.           After activation of this mode, the viewer moves to the right by
  146.           moving the mouse to the right and he/she moves to the left by moving
  147.           the mouse to the left. To move upward, the viewer should move the
  148.           mouse forward (this is just opposite to the conventional airplane).
  149.           Opposite direction of motion is achieved by moving the mouse backward.
  150.           The speed of the forward flying is controlled by the frequency of the
  151.           mouse button 1 been clicked. The speed of the backward flying speed
  152.           is controlled by the frequency of the mouse button 2 been clicked.
  153.           This mode is deactivated by pressing the mouse button 3 or the ESC
  154.           key in case the viewer has a two button mouse or prefers to do so.
  155.  
  156.    2.2 The manipulation of individual object
  157.  
  158.             The viewer can rotate, displace, scale or delete individual or a
  159.         group of 3-D object(s) when it (they) is (are) active. To perform such
  160.         transformations, the viewer should first activate the object(s) by
  161.         turning on the "Select Models" mode, which can be activated in the "3D
  162.         Models" menu, and clicking on object(s) that is (are) not active and is
  163.         (are) of interest. (If the object is already active before been clicked,
  164.         it turns the object into inactive mode after been clicked.) By
  165.         selecting the "Transform" item in "Action" menu, providing the required
  166.         parameters and turning on the transformation buttons, the viewer can
  167.         achieve the intended transformation(s). The order or the transformations
  168.         applied is the same as the one appears on the dialog box.
  169.  
  170.    2.3 Relocation of the viewer
  171.  
  172.             The viewer can change his/her position of viewing from one location
  173.        to another. This is achieved in the "Parameters" menu. By providing the
  174.        parameters related to the open view angle, the polar angle of the viewer
  175.        in the world coordinate system and the distance of the viewer from the
  176.        origin of the world coordinate, the viewer can relocate himself/herself
  177.        according to the information provided.
  178.  
  179.  
  180. Section 3. Displaying the 3-D Images
  181.  
  182.       The 3-D image can be displayed in various forms. In the inactive mode
  183.    discussed below, only a wire-frame of the object can be displayed. In the
  184.    active mode, there are few options for the viewer that can be chosen to
  185.    see different aspects of the object. These options are chosen in the "View"
  186.    menu under the item "Options" (a sub-menu). By activate the object(s) the
  187.    viewer is interested to observe, various effects can be shown.
  188.  
  189.         To display all images in the current session, the viewer can click
  190.    either the "Display All" item in the "3D Models" menu or the "Redraw" item
  191.    in the "View" menu. This is useful in case the viewer want to see the
  192.    effects of certain operations performed by him/her on the images.
  193.  
  194.         There are also some useful drawing actions under the "Draw" sub-menu of
  195.    the "View" menu.
  196.  
  197.  
  198. Section 4. Object Modes
  199.  
  200.        An object in the program has two modes. The first one is the inactive
  201.     mode in which most of the operations on it have no effects except those
  202.     related to the viewer's motion (walk, shift focus, flying and zooming).
  203.     The second one is the active mode in which all operations apply to it.
  204.     Should you find some operations to be not effective on the object you try
  205.     to manipulate, you may have had not make it active. There are
  206.     three ways of turning an inactive object active. The first one is click
  207.     the "Select Models" item in the "3D Model" menu. After the viewer do that,
  208.     a rectangular gray mesh that bound the image appears. Clicking
  209.     the mouse button 1 while locating the mouse pointer inside the mesh will
  210.     change the mode of the object, namely, a active object is turned into
  211.     inactive and vice versa. The second way is to click on the
  212.     "Select All" item in the "3D Model" menu. The action turns every
  213.     one of the objects on the screen active. As an alternative of the above
  214.     two, you can first locate the mouse pointer on the object(s) interested,
  215.     double click the mouse button 1. The object under the mouse pointer
  216.     changes it mode after that. If you click the mouse button 1 when the
  217.     mouse pointer points to the common region of several objects, each one of
  218.     them changes its mode.
  219.  
  220.        In the inactive mode, an object has a color of darkblue. Only its wire
  221.     frame is displayed.
  222.  
  223.        In the active mode, an object is "brightened" when it is displayed in
  224.     the wire frame form. In addition, the hide hidden line and surface opera-
  225.     tions can be applied to them. Also, body coordinate of an object can be
  226.     displayed.
  227.  
  228.  
  229. Section 5. Coordinates
  230.  
  231.     1.) A world coordinate that gives the viewer a sense of direction (but
  232.         not the absolute location) can be drawn. It is always located at the
  233.         focus of point (on the screen) of the viewer.
  234.  
  235.     2.) A "body coordinate" for each individual objects can be drawn.
  236.  
  237.     3.) A "bounding box" for each individual objects can be drawn with
  238.         or without the numerical values of the coordinates be shown. The
  239.         numerical value is related to the world coordinates of the object.
  240.         The body coordinate can also be shown in the future.
  241.  
  242.     4.) A solid "bounding box" for each individual objects can be drawn with or
  243.         without the numerical values of the coordinates be shown.
  244.  
  245. Section 6. Editing
  246.  
  247.  
  248.        This part remains to be developed further.
  249.  
  250. Section 7. Destroy and Cleaning Up
  251.  
  252.        Some or all of the objects created can be destroyed by following the
  253.    following procedure. First activate the object(s) that is (are) intended
  254.    to be destroyed, and deactivate other object(s) that is to be kept. Clicking
  255.    on the "Destroy" item in the "3D Models" menu will deallocate the memory
  256.    allocated by the active object(s) and therefore destroy it (them). In case
  257.    all of the objects in the present session is not needed, the viewer can
  258.    simply click the "Clear All" item in the "3D Models" menu. This action
  259.    will free all of the memories allocated for the 3-D images.
  260.  
  261.  
  262.  
  263.  
  264.  
  265.